<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的消息</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/css.css"/>
</head>

<body>
<style>
    [v-cloak] {
        display: none;
    }
</style>
<div v-cloak id="wrap" class="flex-wrap flex-vertical">
    <header>
        <ul>
            <li class="active">
                <i onclick="back()" class="icon iconfont icon-back"></i>
                <span>消息详情</span>
                <em>&nbsp</em>
            </li>
        </ul>
    </header>
    <div class="sharecontent fixed-header">
        <div class="share-content">
            <div class="share-content-title">{{contents.title}}</div>
            <div class="share-content-user">
                <div class="createtime">
                    <span>{{contents.createtime}}</span>
                </div>
            </div>
            <div class="share-contents">
            </div>
                                <div class="share-contents" v-html="contents.content">
<!--            <div class="share-contents">-->

            </div>
        </div>
    </div>
</div>
</body>

</html>
<script src="../../aui/js/aui.js"></script>
<script src="../../script/vue2.js"></script>
<script src="../../script/vue-resource.min.js"></script>
<script src="../../script/common.js"></script>
<script>
    var vm = new Vue({
        el: "#wrap",
        data: {
            title: '分享详情',
            titles: '',
            contents: []
        },
        mounted: function () {
            var that = this;
            apiready = function () {
                that.getDetail()
            };
        },
        methods: {
            getDetail: function () {
                var that = this;
                showProgress();
                var id = api.pageParam.name
                var token = $api.getStorage('userInfo').token
                api.ajax({
                    url: ajaxRoute.gonggaodetail,
                    method: 'post',
                    data: {
                        values: {
                            token: token,
                            id: id
                        }
                    }
                }, function (ret, err) {
                    // alert(JSON.stringify(ret))
                    if (ret.code == 1) {
                        api.hideProgress();
                        that.contents = ret.data
                    } else {
                        api.hideProgress();
                        api.toast({msg: ret.msg, location: 'middle'});
                    }
                });
            }
        },
        filters: {
            getThumb: function (value) {
                var phone = value
                return ajaxUrl + '/' + phone
            },
        }
    })
</script>
